package com.fhz.day004

import android.app.Application
import com.orhanobut.logger.*


/**
 * 时间:2021/10/18
 * @author msfeng
 * 简述: TODO
 */
class App :Application(){

    override fun onCreate() {
        super.onCreate()

        val formatStrategy: FormatStrategy = PrettyFormatStrategy.newBuilder()
            .showThreadInfo(false) // (Optional) Whether to show thread info or not. Default true
            .methodCount(0) // (Optional) How many method line to show. Default 2
            .methodOffset(7) // (Optional) Hides internal method calls up to offset. Default 5
//            .logStrategy(customLog) // (Optional) Changes the log strategy to print out. Default LogCat
            .tag("init") // (Optional) Global tag for every log. Default PRETTY_LOGGER
            .build()

        Logger.addLogAdapter(DiskLogAdapter())


        Logger.addLogAdapter(AndroidLogAdapter(formatStrategy))
    }
}
